/**
 * Created with JetBrains WebStorm.
 * User: rekey
 * Date: 7/9/13
 * Time: 19:27
 * To change this template use File | Settings | File Templates.
 */
var mongoose = require('mongoose');
module.exports = {
    connect : function(conf, callback) {
        //var url = conf.user + ':' + conf.password + '@' + conf.host + ':' + conf.port + conf.name;
        var url = conf.user + ':' + conf.password + '@' + conf.host + ':' + conf.port + '/' + conf.name;
        mongoose.connect(url, function(err) {
            callback(err);
        });
    }
};